#include <pthread.h>
#include <stdio.h>
#include <error.h>

void *thread_run(void *val)
{
    printf("%s\n", val);
    return NULL;
}
int main(int argc, char const *argv[])
{
    pthread_t pid;
    int pret = pthread_create(&pid, NULL, thread_run, "thread is running");
    
    if (pret < 0)
    {
        perror("pthread create erorr\n");
    }

    int ret = pthread_join(pid, NULL);
    if (ret == 0)
    {

        printf("join success : %d\n", ret);
    }
}
